
package com.hc.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hc.dao.IOfferDao;
import com.hc.domain.Offer;
@Repository
public class OfferDaoImpl extends BaseDaoImpl<Offer> implements IOfferDao {

	@Override
	public List<Offer> findByCateId(int id) {
		return super.find("FROM Offer o WHERE o.offerSpecId=? AND o.status=1", new Object[] {id});
	}

	@Override
	public void saveOffer(Offer o) {
		super.save(o);
	}

	@Override
	public Offer getById(int id) {
		return super.get("FROM Offer o WHERE o.id=?", new Object[] {id});
		
	}

	@Override
	public void updateOffer(Offer o) {
		super.update(o);
	}

}

